home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-serious-
/
misc
/
bhformat
/
format.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-06-15
|
3KB
|
79 lines
/*
* Format -- disk formatting and file-system creation program
* Copyright (C) 1999 Ben Hutchings
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __GNUC__
#error "You need to use GNU CC to compile this."
#endif
#include <dos/dos.h>
#include <exec/types.h>
#ifdef DEBUG
#define D(x) (x)
#else
#define D(x)
#endif
/* Maximum length of a name component - I can't find this defined anywhere */
#define MAX_FS_NAME_LEN 30
/* Short name for an unsigned 64-bit integer type */
typedef unsigned long long ULLONG;
typedef enum {
ertWarning, /* Just a warning of some odd condition */
ertError, /* Arguments were invalid or system configuration is wierd */
ertFailure, /* Something failed, and we can't go on */
} ErrorType;
struct DosEnvec;
struct Library;
struct WBStartup;
extern struct Library * SysBase, * DOSBase, * GfxBase, * IntuitionBase,
* GadToolsBase;
extern struct WBStartup * _WBenchMsg;
extern BPTR bpfhStdErr;
extern struct DosEnvec * pdenDevice;
extern char szDosDevice[MAX_FS_NAME_LEN+2];
extern char * pchDosDeviceColon;
extern struct DosList * pdlList, * pdlDevice;
extern ULLONG ibyStart, ibyEnd;
void ReportErrSz( ErrorType ert, LONG err, const char * pszMessage, ... );
BOOL bSetSzDosDeviceFromSz( const char * pszDevice );
BOOL bSetSzVolumeFromSz( const char * pszVolume );
BOOL bSetFstFromSz( const char * pszFileSysType );
BOOL bSetDevfFromSz( const char * pszDevFlags );
BOOL bGetDosDevice(void);
void FreeDosDevice(void);
BOOL bGetExecDevice( BOOL bWillVerify );
void FreeExecDevice(void);
BOOL bFormatCylinder( ULONG icyl );
BOOL bVerifyCylinder( ULONG icyl );
BOOL bMakeFileSys( BOOL bFFS, BOOL bOFS, BOOL bIntl, BOOL bNoIntl,
BOOL bDirCache, BOOL bNoDirCache );
BOOL bMakeFiles( BOOL bDiskIcon );
void FreeAll(void);
void RawDoFmtSz( char * pszBuffer, const char * pszFormat, ... );
void RawDoVFmtSz( char * pszBuffer, const char * pszFormat, APTR pData );
int rcCliMain(void);
int rcGuiMain(void);